package com.size.mall.user.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.size.mall.mallapi.entity.Member;
import com.size.mall.mallapi.service.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 会员表 前端控制器
 * </p>
 *
 * @author Helen
 * @since 2019-10-18
 */
@RestController
@RequestMapping("/ums/member")
@Api(description = "成员后台管理")
public class MemberController {

    @Reference
    private MemberService memberService;


    @GetMapping("/")
    @ApiOperation("查询所有成员")
    public List<Member> members() {

        return memberService.list(null);

    }

    @PutMapping("/{id}")
    @ApiOperation("成员修改")
    public String putMember(
            @PathVariable("id") @ApiParam(value = "成员id", required = true) Long id
            , @ApiParam("成员属性") Member member
                           ) {


        return null;
    }

}

